package com.dto;

import org.bson.Document;
import org.bson.types.ObjectId;

import java.io.Serializable;

/**
 * Created by jeff on 2017/1/14.
 */
public class MsgDetails implements Serializable, Comparable<MsgDetails> {

    private String _id;

    //消息id
    private String msgId;

    //用户id
    private Long userId;

    //消息类型
    private String msgType;


    //消息标题
    private String msgTitle;

    //消息主体
    public String   msgContent;

    //消息保存的时间
    public Long cts;

    //消息状态:1:未读， 2：已读， 3：删除
    public Integer status;

    //客户端 ： 1：华财通， 2：理财师， 3：PC
    public Integer channel;

    public String url;

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Integer getChannel() {
        return channel;
    }

    public void setChannel(Integer channel) {
        this.channel = channel;
    }

    public String getMsgId() {
        return msgId;
    }

    public void setMsgId(String msgId) {
        this.msgId = msgId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getMsgType() {
        return msgType;
    }

    public void setMsgType(String msgType) {
        this.msgType = msgType;
    }


    public String getMsgTitle() {
        return msgTitle;
    }

    public void setMsgTitle(String msgTitle) {
        this.msgTitle = msgTitle;
    }

    public String getMsgContent() {

        return msgContent;
    }

    public void setMsgContent(String msgContent) {
        this.msgContent = msgContent;
    }

    public Long getCts() {
        return cts;
    }

    public void setCts(Long cts) {
        this.cts = cts;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public MsgDetails() {

    }

    public String get_id() {
        return _id;
    }

    public void set_id(String _id) {
        this._id = _id;
    }

    @Override
    public String toString() {
        return "MsgDetails{" +
                "_id=" + _id +
                ", msgId='" + msgId + '\'' +
                ", userId=" + userId +
                ", msgType='" + msgType + '\'' +
                ", msgTitle='" + msgTitle + '\'' +
                ", msgContent='" + msgContent + '\'' +
                ", cts=" + cts +
                ", status=" + status +
                ", channel=" + channel +
                ", url='" + url + '\'' +
                '}';
    }

    @Override
    public int compareTo(MsgDetails o) {
        return this.getCts().compareTo(o.getCts()) * -1;
    }
}
